package com.hpjpw.ido.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 聊天内容对象 ido_communication
 * 
 * @author hpj
 * @date 2021-01-02
 */
@ApiModel("CommunicationDomain")
public class Communication extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** ID */
    @Excel(name = "ID")
    @ApiModelProperty("ID")
    private String id;

    /** 发送者ID（用户ID） */
    @Excel(name = "发送者ID", readConverterExp = "用户ID")
    @ApiModelProperty("发送者ID")
    private Long senderId;

    /** 消息内容 */
    @ApiModelProperty("消息内容")
    private String content;

    /** 发送时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "发送时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty("发送时间")
    private Date time;

    /** 守护关系ID */
    @Excel(name = "守护关系ID")
    @ApiModelProperty("守护关系ID")
    private Long guardId;

    public void setId(String id) 
    {
        this.id = id;
    }

    public String getId() 
    {
        return id;
    }
    public void setSenderId(Long senderId) 
    {
        this.senderId = senderId;
    }

    public Long getSenderId() 
    {
        return senderId;
    }
    public void setContent(String content) 
    {
        this.content = content;
    }

    public String getContent() 
    {
        return content;
    }
    public void setTime(Date time) 
    {
        this.time = time;
    }

    public Date getTime() 
    {
        return time;
    }
    public void setGuardId(Long guardId) 
    {
        this.guardId = guardId;
    }

    public Long getGuardId() 
    {
        return guardId;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("senderId", getSenderId())
            .append("content", getContent())
            .append("time", getTime())
            .append("guardId", getGuardId())
            .toString();
    }
}
